3.1.10 \(\int (c+d x)^2 \sinh ^2(a+b x) \, dx\) [10]

3.1.10.1 Optimal result
3.1.10.2 Mathematica [A] (verified)
3.1.10.3 Rubi [A] (verified)
3.1.10.4 Maple [A] (verified)
3.1.10.5 Fricas [A] (verification not implemented)
3.1.10.6 Sympy [B] (verification not implemented)
3.1.10.7 Maxima [A] (verification not implemented)
3.1.10.8 Giac [A] (verification not implemented)
3.1.10.9 Mupad [B] (verification not implemented)

3.1.10.1 Optimal result

Integrand size = 16, antiderivative size = 95 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=-\frac {d^2 x}{4 b^2}-\frac {(c+d x)^3}{6 d}+\frac {d^2 \cosh (a+b x) \sinh (a+b x)}{4 b^3}+\frac {(c+d x)^2 \cosh (a+b x) \sinh (a+b x)}{2 b}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2} \]

output
-1/4*d^2*x/b^2-1/6*(d*x+c)^3/d+1/4*d^2*cosh(b*x+a)*sinh(b*x+a)/b^3+1/2*(d* 
x+c)^2*cosh(b*x+a)*sinh(b*x+a)/b-1/2*d*(d*x+c)*sinh(b*x+a)^2/b^2
 
3.1.10.2 Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.79 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=\frac {-4 b^3 x \left (3 c^2+3 c d x+d^2 x^2\right )-6 b d (c+d x) \cosh (2 (a+b x))+3 \left (d^2+2 b^2 (c+d x)^2\right ) \sinh (2 (a+b x))}{24 b^3} \]

input
Integrate[(c + d*x)^2*Sinh[a + b*x]^2,x]
 
output
(-4*b^3*x*(3*c^2 + 3*c*d*x + d^2*x^2) - 6*b*d*(c + d*x)*Cosh[2*(a + b*x)] 
+ 3*(d^2 + 2*b^2*(c + d*x)^2)*Sinh[2*(a + b*x)])/(24*b^3)
 
3.1.10.3 Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.562, Rules used = {3042, 25, 3792, 17, 25, 3042, 25, 3115, 24}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c+d x)^2 \sinh ^2(a+b x) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -(c+d x)^2 \sin (i a+i b x)^2dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int (c+d x)^2 \sin (i a+i b x)^2dx\)

\(\Big \downarrow \) 3792

\(\displaystyle -\frac {d^2 \int -\sinh ^2(a+b x)dx}{2 b^2}-\frac {1}{2} \int (c+d x)^2dx-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}\)

\(\Big \downarrow \) 17

\(\displaystyle -\frac {d^2 \int -\sinh ^2(a+b x)dx}{2 b^2}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {d^2 \int \sinh ^2(a+b x)dx}{2 b^2}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {d^2 \int -\sin (i a+i b x)^2dx}{2 b^2}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {d^2 \int \sin (i a+i b x)^2dx}{2 b^2}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

\(\Big \downarrow \) 3115

\(\displaystyle -\frac {d^2 \left (\frac {\int 1dx}{2}-\frac {\sinh (a+b x) \cosh (a+b x)}{2 b}\right )}{2 b^2}-\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

\(\Big \downarrow \) 24

\(\displaystyle -\frac {d (c+d x) \sinh ^2(a+b x)}{2 b^2}-\frac {d^2 \left (\frac {x}{2}-\frac {\sinh (a+b x) \cosh (a+b x)}{2 b}\right )}{2 b^2}+\frac {(c+d x)^2 \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {(c+d x)^3}{6 d}\)

input
Int[(c + d*x)^2*Sinh[a + b*x]^2,x]
 
output
-1/6*(c + d*x)^3/d + ((c + d*x)^2*Cosh[a + b*x]*Sinh[a + b*x])/(2*b) - (d* 
(c + d*x)*Sinh[a + b*x]^2)/(2*b^2) - (d^2*(x/2 - (Cosh[a + b*x]*Sinh[a + b 
*x])/(2*b)))/(2*b^2)
 

3.1.10.3.1 Defintions of rubi rules used

rule 17
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 
)/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
 

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3792
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo 
l] :> Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^n/(f^2*n^2)), x] + (-Sim 
p[b*(c + d*x)^m*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x] + Simp[b^ 
2*((n - 1)/n)   Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[d^2 
*m*((m - 1)/(f^2*n^2))   Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x]) 
/; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]
 
3.1.10.4 Maple [A] (verified)

Time = 0.88 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.83

method result size
parallelrisch \(\frac {\left (2 \left (d x +c \right )^{2} b^{2}+d^{2}\right ) \sinh \left (2 b x +2 a \right )-4 b \left (\frac {d \left (d x +c \right ) \cosh \left (2 b x +2 a \right )}{2}+x \left (\frac {1}{3} d^{2} x^{2}+c d x +c^{2}\right ) b^{2}-\frac {c d}{2}\right )}{8 b^{3}}\) \(79\)
risch \(-\frac {x^{3} d^{2}}{6}-\frac {d c \,x^{2}}{2}-\frac {c^{2} x}{2}-\frac {c^{3}}{6 d}+\frac {\left (2 b^{2} d^{2} x^{2}+4 b^{2} c d x +2 b^{2} c^{2}-2 b \,d^{2} x -2 b c d +d^{2}\right ) {\mathrm e}^{2 b x +2 a}}{16 b^{3}}-\frac {\left (2 b^{2} d^{2} x^{2}+4 b^{2} c d x +2 b^{2} c^{2}+2 b \,d^{2} x +2 b c d +d^{2}\right ) {\mathrm e}^{-2 b x -2 a}}{16 b^{3}}\) \(145\)
derivativedivides \(\frac {\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{3}}{6}-\frac {\left (b x +a \right ) \cosh \left (b x +a \right )^{2}}{2}+\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}\right )}{b^{2}}-\frac {2 d^{2} a \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\cosh \left (b x +a \right )^{2}}{4}\right )}{b^{2}}+\frac {2 d c \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\cosh \left (b x +a \right )^{2}}{4}\right )}{b}+\frac {d^{2} a^{2} \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b^{2}}-\frac {2 d a c \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}+c^{2} \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}\) \(262\)
default \(\frac {\frac {d^{2} \left (\frac {\left (b x +a \right )^{2} \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{3}}{6}-\frac {\left (b x +a \right ) \cosh \left (b x +a \right )^{2}}{2}+\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{4}+\frac {b x}{4}+\frac {a}{4}\right )}{b^{2}}-\frac {2 d^{2} a \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\cosh \left (b x +a \right )^{2}}{4}\right )}{b^{2}}+\frac {2 d c \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\cosh \left (b x +a \right )^{2}}{4}\right )}{b}+\frac {d^{2} a^{2} \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b^{2}}-\frac {2 d a c \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}+c^{2} \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}\) \(262\)

input
int((d*x+c)^2*sinh(b*x+a)^2,x,method=_RETURNVERBOSE)
 
output
1/8*((2*(d*x+c)^2*b^2+d^2)*sinh(2*b*x+2*a)-4*b*(1/2*d*(d*x+c)*cosh(2*b*x+2 
*a)+x*(1/3*d^2*x^2+c*d*x+c^2)*b^2-1/2*c*d))/b^3
 
3.1.10.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.29 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=-\frac {2 \, b^{3} d^{2} x^{3} + 6 \, b^{3} c d x^{2} + 6 \, b^{3} c^{2} x + 3 \, {\left (b d^{2} x + b c d\right )} \cosh \left (b x + a\right )^{2} - 3 \, {\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} + d^{2}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + 3 \, {\left (b d^{2} x + b c d\right )} \sinh \left (b x + a\right )^{2}}{12 \, b^{3}} \]

input
integrate((d*x+c)^2*sinh(b*x+a)^2,x, algorithm="fricas")
 
output
-1/12*(2*b^3*d^2*x^3 + 6*b^3*c*d*x^2 + 6*b^3*c^2*x + 3*(b*d^2*x + b*c*d)*c 
osh(b*x + a)^2 - 3*(2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 + d^2)*cosh(b* 
x + a)*sinh(b*x + a) + 3*(b*d^2*x + b*c*d)*sinh(b*x + a)^2)/b^3
 
3.1.10.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (85) = 170\).

Time = 0.26 (sec) , antiderivative size = 264, normalized size of antiderivative = 2.78 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=\begin {cases} \frac {c^{2} x \sinh ^{2}{\left (a + b x \right )}}{2} - \frac {c^{2} x \cosh ^{2}{\left (a + b x \right )}}{2} + \frac {c d x^{2} \sinh ^{2}{\left (a + b x \right )}}{2} - \frac {c d x^{2} \cosh ^{2}{\left (a + b x \right )}}{2} + \frac {d^{2} x^{3} \sinh ^{2}{\left (a + b x \right )}}{6} - \frac {d^{2} x^{3} \cosh ^{2}{\left (a + b x \right )}}{6} + \frac {c^{2} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b} + \frac {c d x \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{b} + \frac {d^{2} x^{2} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b} - \frac {c d \cosh ^{2}{\left (a + b x \right )}}{2 b^{2}} - \frac {d^{2} x \sinh ^{2}{\left (a + b x \right )}}{4 b^{2}} - \frac {d^{2} x \cosh ^{2}{\left (a + b x \right )}}{4 b^{2}} + \frac {d^{2} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{4 b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \sinh ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \]

input
integrate((d*x+c)**2*sinh(b*x+a)**2,x)
 
output
Piecewise((c**2*x*sinh(a + b*x)**2/2 - c**2*x*cosh(a + b*x)**2/2 + c*d*x** 
2*sinh(a + b*x)**2/2 - c*d*x**2*cosh(a + b*x)**2/2 + d**2*x**3*sinh(a + b* 
x)**2/6 - d**2*x**3*cosh(a + b*x)**2/6 + c**2*sinh(a + b*x)*cosh(a + b*x)/ 
(2*b) + c*d*x*sinh(a + b*x)*cosh(a + b*x)/b + d**2*x**2*sinh(a + b*x)*cosh 
(a + b*x)/(2*b) - c*d*cosh(a + b*x)**2/(2*b**2) - d**2*x*sinh(a + b*x)**2/ 
(4*b**2) - d**2*x*cosh(a + b*x)**2/(4*b**2) + d**2*sinh(a + b*x)*cosh(a + 
b*x)/(4*b**3), Ne(b, 0)), ((c**2*x + c*d*x**2 + d**2*x**3/3)*sinh(a)**2, T 
rue))
 
3.1.10.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.74 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=-\frac {1}{8} \, {\left (4 \, x^{2} - \frac {{\left (2 \, b x e^{\left (2 \, a\right )} - e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )}}{b^{2}} + \frac {{\left (2 \, b x + 1\right )} e^{\left (-2 \, b x - 2 \, a\right )}}{b^{2}}\right )} c d - \frac {1}{48} \, {\left (8 \, x^{3} - \frac {3 \, {\left (2 \, b^{2} x^{2} e^{\left (2 \, a\right )} - 2 \, b x e^{\left (2 \, a\right )} + e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )}}{b^{3}} + \frac {3 \, {\left (2 \, b^{2} x^{2} + 2 \, b x + 1\right )} e^{\left (-2 \, b x - 2 \, a\right )}}{b^{3}}\right )} d^{2} - \frac {1}{8} \, c^{2} {\left (4 \, x - \frac {e^{\left (2 \, b x + 2 \, a\right )}}{b} + \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{b}\right )} \]

input
integrate((d*x+c)^2*sinh(b*x+a)^2,x, algorithm="maxima")
 
output
-1/8*(4*x^2 - (2*b*x*e^(2*a) - e^(2*a))*e^(2*b*x)/b^2 + (2*b*x + 1)*e^(-2* 
b*x - 2*a)/b^2)*c*d - 1/48*(8*x^3 - 3*(2*b^2*x^2*e^(2*a) - 2*b*x*e^(2*a) + 
 e^(2*a))*e^(2*b*x)/b^3 + 3*(2*b^2*x^2 + 2*b*x + 1)*e^(-2*b*x - 2*a)/b^3)* 
d^2 - 1/8*c^2*(4*x - e^(2*b*x + 2*a)/b + e^(-2*b*x - 2*a)/b)
 
3.1.10.8 Giac [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.43 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=-\frac {1}{6} \, d^{2} x^{3} - \frac {1}{2} \, c d x^{2} - \frac {1}{2} \, c^{2} x + \frac {{\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} - 2 \, b d^{2} x - 2 \, b c d + d^{2}\right )} e^{\left (2 \, b x + 2 \, a\right )}}{16 \, b^{3}} - \frac {{\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} + 2 \, b d^{2} x + 2 \, b c d + d^{2}\right )} e^{\left (-2 \, b x - 2 \, a\right )}}{16 \, b^{3}} \]

input
integrate((d*x+c)^2*sinh(b*x+a)^2,x, algorithm="giac")
 
output
-1/6*d^2*x^3 - 1/2*c*d*x^2 - 1/2*c^2*x + 1/16*(2*b^2*d^2*x^2 + 4*b^2*c*d*x 
 + 2*b^2*c^2 - 2*b*d^2*x - 2*b*c*d + d^2)*e^(2*b*x + 2*a)/b^3 - 1/16*(2*b^ 
2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 + 2*b*d^2*x + 2*b*c*d + d^2)*e^(-2*b*x 
 - 2*a)/b^3
 
3.1.10.9 Mupad [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.34 \[ \int (c+d x)^2 \sinh ^2(a+b x) \, dx=\frac {c^2\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{4\,b}-\frac {d^2\,x^3}{6}-\frac {c^2\,x}{2}+\frac {d^2\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{8\,b^3}-\frac {c\,d\,x^2}{2}-\frac {d^2\,x\,\mathrm {cosh}\left (2\,a+2\,b\,x\right )}{4\,b^2}+\frac {d^2\,x^2\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{4\,b}-\frac {c\,d\,\mathrm {cosh}\left (2\,a+2\,b\,x\right )}{4\,b^2}+\frac {c\,d\,x\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{2\,b} \]

input
int(sinh(a + b*x)^2*(c + d*x)^2,x)
 
output
(c^2*sinh(2*a + 2*b*x))/(4*b) - (d^2*x^3)/6 - (c^2*x)/2 + (d^2*sinh(2*a + 
2*b*x))/(8*b^3) - (c*d*x^2)/2 - (d^2*x*cosh(2*a + 2*b*x))/(4*b^2) + (d^2*x 
^2*sinh(2*a + 2*b*x))/(4*b) - (c*d*cosh(2*a + 2*b*x))/(4*b^2) + (c*d*x*sin 
h(2*a + 2*b*x))/(2*b)